'use strict';
const db = uniCloud.database();
// 获取 `user` 集合的引用
const collection = db.collection('classify');
exports.main = async (event, context) => {
	let {pageSize,select} = event
	let classifyList
	if(pageSize || select){
		let classifyList = await collection.limit(8).get()
		//返回数据给客户端
		return classifyList
	}else{
		let classifyList = await collection.get()
		//返回数据给客户端
		return classifyList
	}
};
